public class Main {
    public static void main(String[] args) {
        ArrayQueue queue = new ArrayQueue(10);

        queue.enqueue(10);
        System.out.println("入队列元素值: 10");
        queue.enqueue(20);
        System.out.println("入队列元素值: 20");
        queue.enqueue(30);
        System.out.println("入队列元素值: 30");

        System.out.print("队列当前元素值: ");
        queue.printQueue();

        int dequeued1 = queue.dequeue();
        System.out.println("出队列元素值: " + dequeued1);

        System.out.print("队列当前元素值: ");
        queue.printQueue();

        queue.enqueue(40);
        System.out.println("入队列元素值: 40");
        queue.enqueue(50);
        System.out.println("入队列元素值: 50");

        System.out.print("队列当前元素值: ");
        queue.printQueue();

        int dequeued2 = queue.dequeue();
        System.out.println("出队列元素值: " + dequeued2);
        int dequeued3 = queue.dequeue();
        System.out.println("出队列元素值: " + dequeued3);

        System.out.print("队列当前元素值: ");
        queue.printQueue();

        System.out.println("当前队列首元素为: " + queue.peek());
    }
}